//
// Created by Administrator on 2024/7/9.
//

#include <iostream>
#include <vector>

using namespace std;

int findMax(vector<int> v, int n, int m = -1e9)
{
    if (n < 1)
        return v[n];
//    return max(m,findMax(v,n-1,v[n-1]));
    int t = findMax(v, n - 1, v[n - 1]);
    if (m > t)
        return m;
    else
        return t;
}

int main()
{
    vector<int> l{98,100, 5, 3, 7, 4, 1, 0, 99, 10};
    cout << findMax(l, l.size(), l[l.size() - 1]);
    return 0;
}